Skip to main content

UpdateStack

Description

call the UpdateStack interface to update the resource stack.

Request Method

POST

Request Path

/apsara/route/ROS/UpdateStack

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
StackPolicyDuringUpdateBodyBODYstringNo{"Statement": [{"Effect": "Allow", "Action": "Update:*", "Principal": "*", "Resource": "*"}]}temporarily overrides the structure of the resource stack policy body. The length is 1~16,384 bytes. if you want to update protected resources, specify a temporary overwrite resource stack policy during the update. If no resource stack policy is specified, the current policy associated with the resource stack will be used. This parameter only takes effect when the set type is UPDATE. You can only specify one of the following parameters: StackPolicyBody StackPolicyURL StackPolicyDuringUpdateBody StackPolicyDuringUpdateURL
Parameters.N.ParameterKeyBODYstringYesAmountthe name of the parameter. If the name and value of the parameter are not specified, ROS will use the default value specified in the template. The maximum value of N is 200. description Parameters as an optional parameter. if the Parameters needs to be specified, the Parameters. n. ParameterKey and Parameters. n. ParameterValue must be specified at the same time.
Parameters.N.ParameterValueBODYstringYes12parameter value. The maximum value of n is 200. description Parameters as an optional parameter. if the Parameters needs to be specified, the Parameters. n. ParameterKey and Parameters. n. ParameterValue must be specified at the same time.
ReplacementOptionBODYstringNoDisabledif the attribute of the resource changes and the changed attribute does not support modification and update (the physical ID of the resource does not change), whether to use replacement update (recreate after deleting the resource, the physical ID of the resource will change). Value: Enabled: allow replacement updates. Disabled (default): replacement updates are not allowed. description the priority of modifying updates is higher than that of replacing updates.
TemplateBodyBODYstringNo{"ROSTemplateFormatVersion": "2015-09-01"}the structure of the template body. The length is 1~524 and 288 bytes. /p> p data-tag = "p" class = "p"> if the length is large, it is recommended to pass the parameters in the request body through HTTP POST + Body Param to avoid the request failure caused by the URL being too long. description you must specify the parameter TemplateBody or TemplateURL, but not at the same time.
StackPolicyBodyBODYstringNo{"Statement": [{"Action": "Update:*", "Resource": "*", "Effect": "Allow", "Principal": "*"}]}the structure of the resource stack policy body, the length is 1~16,384 bytes. description you must specify the parameter StackPolicyBody or StackPolicyURL, but not at the same time.
StackPolicyURLBODYstringNooss://ros-stack-policy/demothe location of the file containing the resource stack policy. The URL must point to a policy located on a Web server (HTTP or HTTPS) or an Alibaba Cloud OSS bucket (for example, oss:// ros/stack-policy/demo, oss:// ros/stack-policy/demo?RegionId = cn-hangzhou). The maximum file value of the policy is 16 and 384 bytes. If the OSS region is not specified, the default RegionId is the same as the interface parameter. description you must specify the parameter StackPolicyBody or StackPolicyURL, but not at the same time. The maximum length of the URL is 1350 bytes.
versionBODYstringNo2016-01-01version of api
StackPolicyDuringUpdateURLBODYstringNooss://ros-stack-policy/demothe location of the file that updates the resource stack policy. The URL must point to the policy located in the Web server (HTTP or HTTPS) or Aliyun OSS storage space (for example, oss:// ros/stack-policy/demo, oss:// ros/stack-policy/demo?RegionId = cn-hangzhou). The maximum file value of the policy is 16 and 384 bytes. If the OSS region is not specified, the default RegionId is the same as the interface parameter. description you must specify the parameter StackPolicyBody or StackPolicyURL, but not at the same time. The maximum length of the URL is 1350 bytes. if you want to update protected resources, specify a temporary overwrite resource stack policy during the update. If no resource stack policy is specified, the current policy associated with the resource stack will be used. This parameter only takes effect when the change set type is UPDATE. You can only specify one of the following parameters: StackPolicyBody StackPolicyURL StackPolicyDuringUpdateBody StackPolicyDuringUpdateURL
TemplateURLBODYstringNooss://ros-template/demothe location of the file containing the template body. The URL must point to the template (1~524,288 bytes) located in the HTTP Web server (HTTP or HTTPS) or Aliyun OSS bucket. The URL of the OSS bucket, such as oss:// ros/template/demo or oss:// ros/template/demo?RegionId = cn-hangzhou. If the OSS region is not specified, the default RegionId is the same as the interface parameter. description you must specify TemplateBody or TemplateURL parameters, but not at the same time.
RamRoleNameBODYstringNotest-roleRAM role name. ROS will play this role to create a resource stack and use the role's credentials to make interface calls on behalf of the user. ROS always uses this role for operations that will take place on the resource stack. As long as the user has the right to operate on the resource stack, even if the user does not have the right to use the role, ROS will use this role to ensure that the role grants minimal permissions. If the user does not specify this value, ROS will use the role previously associated with the resource stack. If no role is available, ROS will use temporary credentials generated from your user credentials. The maximum length of the RAM role name is 64 bytes.
regionIdBODYstringYesNo sample value for this parameter.region id
UsePreviousParametersBODYbooleanNotruewhether the unpassed parameter uses the last passed value. Value: true: unpassed parameters use the last passed value. false: unpassed parameters do not use the last passed value.
RegionIdBODYstringYescn-beijingthe region ID to which the resource stack belongs.
ClientTokenBODYstringNo123e4567-e89b-12d3-a456-42665544****guarantees the idempotence of the request. This parameter value is generated by the client and must be globally unique. is no more than 64 characters in length and can contain English letters, numbers, dashes (-) and underscores (_).
DisableRollbackBODYbooleanNofalsethis parameter is invalid when updating the resource stack. If the update fails, a rollback is forced.
StackIdBODYstringYes4a6c9851-3b0f-4f5f-b4ca-a14bf691****resource stack ID.
TimeoutInMinutesBODYlongNo10timeout for updating the resource stack. default value: 60. Unit: minutes.

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}